﻿using System.Data;
using System.Data.SqlClient;

namespace UniversityStudentManagemnetSystem.DAO.DAL.Gateway
{
    public class RoomGateway:DAO.Gateway.Gateway
    {
        public DataTable GetAllRooms()
        {
            string selectQuery = string.Format("select * from t_Room");
            SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(selectQuery, GetConnectionString());
            DataSet dataSet = new DataSet();
            sqlDataAdapter.Fill(dataSet, "RoomTable");
            DataTable mydatable = dataSet.Tables["RoomTable"];
            return mydatable;
        }
    }
}